Figure definition method in automatic programming

ABSTRACT

A figure definition method including the steps of displaying a list (11) of the definition statements of already defined figure elements and graphic images (12) of the already defined figures on a display screen; successively displaying, one at a time in a form distinguishable from others, figure definition statements (11a, 11b, 11c . . . ) in the list (11), as well as the corresponding graphic images (12a, 12b, 12c . . . ), whenever a first element selection key (13a) is operated to select a first figure element; then successively displaying, one at a time in a form distinguishable from others, figure definition statements in the list (11), as well as the corresponding graphic images, whenever a second element selection key (13b) is operated, to select a second figure element; and defining another figure element using the selected first and second figure elements.

BACKGROUND OF THE INVENTION

1. Field of the Invention

This invention relates to a figure definition method for use inautomatic programming and, more particularly, to a figure definitionmethod in automatic programming for creating an NC machining programautomatically from figure definition statements and motion statementscreated in an automatic programming language.

2. Description of the Related Art

In automatic programming for creating NC data using an automaticprogramming language such as APT (automatic programming tools) or FAPT,

(a) a parts program based on the automatic programming language iscreated by defining figure elements such as points, straight lines andcircular arcs using simple symbols (this is referred to as "figuredefinition"), and then defining a tool path using the figure elementssuch as the defined points, straight lines and circular arcs (referredto as "motion statement definition"), and

(b) the parts program based on the automatic programming language issubsequently converted into an NC machining program, which comprises NCdata (EIA codes or ISO codes) in a format capable of being executed byan NC unit, by using an NC data output table.

In figure definition, conventionally the figure elements are defined bythe methods illustrated hereinbelow. Specifically, in defining a point,various methods are available, as follows:

(i) the coordinates of a point may be entered directly from a keyboardin the form P_(i) =x_(i), y_(i) ;

(ii) the point can be defined as an intersection between two straightlines S_(m), S_(n) [see FIG. 4(a)];

(iii) the point can be defined as either the left or right point ofintersection of the two intersections between the straight line S_(m)and a circle C_(n) [see FIG. 4(b)];

(iv) the point can be defined as a point of tangency between thestraight line S_(m) and the circle C_(n) [see FIG. 4(c)];

(v) the point can be defined as either the upper or lower point ofintersection of the two intersections between two circles [see FIG.4(d)]; or

(vi) the point can be defined as a point of tangency between two circles[see FIG. 4(e)]. For example, in the cases of (ii), (iii) and (iv), ifthe following figure definition statements created in the automaticprogramming language are entered from a keyboard: ##EQU1## (where L:left; R: right), then the coordinates x_(i), y_(i) of the desiredintersection or point of tangency are calculated and the pointdefinition data are stored in memory in the form

    P.sub.i =x.sub.i, y.sub.i

Various methods of defining a straight line are also available, asfollows:

(i) the straight line can be defined as a straight line S_(i) passingthrough one point P_(m) and forming an angle α with a horizontal axis[See FIG. 5(a)];

(ii) the straight line can be defined as a straight line S_(i) passingthrough two points P_(m), P_(n) [see FIG. 5(b)];

(iii) the straight line can be defined as a straight line S_(i) passingthrough the point P_(m) and tangent to the circle C_(n) [see FIG. 5(c)];or

(iv) the straight line can be defined as a straight line S_(i) tangentto the two circles C_(m), C_(n) [see FIG. 5(d)]. For example, in thecases of (i)-(iv), if the following figure definition statements createdin the automatic programming language are entered from a keyboard:##EQU2## (where A: above; B: below), then a distance L_(i) from theorigin (0,0) to the straight line and an angle A_(i) which the straightline forms with a horizontal line are calculated and the straight-linedefinition data are stored in memory in the form

    S.sub.i =L.sub.i, A.sub.i

Various methods of defining a circular arc are also available, asfollows:

(i) the circular arc can be defined as a circle C_(i) center P_(m) andradius r [See FIG. 6(a)];

(ii) the circular arc can be defined as a circle C_(i) passing throughpoint P_(n) and having the center P_(m) See FIG. 6(b)];

(iii) the circular arc can be defined as a circle C_(i) tangent tostraight line S_(n) and having the center P_(m) See FIG. 6(c)];

(iv) the circular arc can be defined as a circle C_(i) tangent to circleC_(n) and having the center P_(m) [See FIG. 6(d)];

(v) the circular arc can be defined as a circle C_(i) tangent tostraight line S_(n) and having radius r and center P_(m) [See FIG.6(e)];

(vi) the circular arc can be defined as a circle C_(i) of radius rtangent to the two straight lines S_(m), S_(n) [See FIG. 6(f)]; or

(vi) the circular arc can be defined as a circle C_(i) passing throughthree points P_(m), P_(n), P_(s) [See FIG. 6(g)]. For example, in thecases of (i), (ii) and (iii), if the following figure definitionstatements created in the automatic programming language are enteredfrom a keyboard: ##EQU3## then the coordinates x_(m), y_(m) of thecenter of the center and the radius r thereof are calculated and thecircle definition data are stored in memory in the form

    C.sub.i =x.sub.m, y.sub.m, r

Thus, when a new figure element is defined using figure elements alreadydefined, conventionally a code (the element identifier) attached to thealready defined figure element must be entered from the keyboard todesignate the figure element, and the figure definition statement mustbe created and entered in a predetermined format.

With this method, however, the operator must memorize the code (elementidentifier) of the already defined element and must know the grammar(the rules) of the figure definition statement. This makes figuredefinition troublesome and incapable of being performed in a rapidmanner.

Accordingly, an object of the present invention is to provide a figuredefinition method in the automatic programming in which it isunnecessary to memorize the codes of figure elements (also termed"previously defined figure element definition statements" or "definedfigure element definition statements"), and in which figure elementsused in defining new figure elements can be confirmed visually through asimple method.

SUMMARY OF THE INVENTION

A figure definition method in automatic programming according to theinvention includes displaying a list and graphic images regardingalready defined figure elements on a display screen, successivelydisplaying, one at a time in a form distinguishable from others, figuredefinition statements in the list, as well as the corresponding graphicimages, whenever a first element selection key is operated, similarlysuccessively displaying, one at a time in a form distinguishable fromothers, figure definition statements in the list, as well as thecorresponding graphic images, by operating a second element selectionkey after the first figure element is selected, and defining anotherfigure element using the first and second figure elements. In accordancewith this method, it is unnecessary to memorize the codes of figureelements, and figure elements used in defining a new figure element canbe verified visually through a simple method.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 shows an example of a display screen in the figure definitionmethod of the present invention;

FIG. 2 is a block diagram of an automatic programming system to whichthe invention can be applied;

FIG. 3 is a flowchart of figure definition processing according to theinvention; and

FIGS. 4 through 6 are diagrams illustrating the conventional methods offigure definition, in which FIGS. 4(a)-4(e) are diagrams for describinga point definition method, FIGS. 5(a)-5(d) are diagrams for describing astraight-line definition method, and FIGS. 6(a)-6(g) are diagrams fordescribing a circle definition method.

DESCRIPTION OF THE PREFERRED EMBODIMENT

FIG. 1 shows an example of a conversational display screen used thefigure definition method of the present invention. Numeral 10 denotes adisplay screen, 11 denotes a list which includes definition statements11a, 11b, 11c . . . of already defined figure elements, 12 denotes agraphic image of already defined figures, 13a, 13b denotes first andsecond element selection keys provided on a keyboard and arranged tocorrespond to wording "1: FIRST ELEMENT SELECTION" and "2: SECONDELEMENT SELECTION" appearing on the lowermost line of the display screen10. Numeral 13c denotes an execute key, and 14 denotes an areadisplaying identification numbers of elements selected by the first andsecond element selection keys.

The list 11 of figure definition statements of the already definedfigure elements (also termed "previously defined figure elementdefinition statements" or "defined figure element definitionstatements") and the graphic image 12 of the already defined figures aredisplayed on the display screen 10. Each time the first figure elementselection key 13a is operated, graphic images 12a, 12b, 12ccorresponding to the figure definition statements 11a,11b,11c in thelist 11 are successively displayed, one at a time, in a formdistinguishable from the other images so that this element can beselected.

Thereafter, and in a similar manner, the second element selection key13b is operated to successively display, one at a time in a formdistinguishable from the other images, graphic images corresponding tothe figure definition statements in the list 11. Thus, a second figureelement is selected. Another figure element is defined using theselected first and second figure elements.

FIG. 2 is a block diagram of an automatic programming apparatus to whichthe method of the invention can be applied. In FIG. 2, numeral 1 denotesthe main body of an automatic programming apparatus, 1a denotes aprocessor, 1b denotes a ROM storing a loading program, 1c denotes a RAM,and 1d denotes a working memory. The RAM 1c is provided with a systemprogram storage area 1c-1 storing a system program and the like readfrom, for example, a floppydisk, a part program storage area 1c-2 forstoring a part program PTP in the automatic programming language, and anNC data storage area 1c-3 for storing NC data (an NC machining program).Numeral 2 denotes a printer, 3 denotes a keyboard, 4 denotes a graphicdisplay unit, 5 denotes a disk controller and 5a denotes a floppy.

Various keys are provided on the keyboard 3. The keyboard 3 is providedwith the first element selection key 13a for selecting a first figureelement, the second element selection key 13b for selecting a secondfigure element, and an execute key 13c, these being employed when a newfigure element is defined using the first and second already definedfigure elements.

FIG. 3 is a flowchart of processing according to the present invention.The figure definition method of the invention will now be described inaccordance with FIGS. 1 through 3.

The processor la causes the list 11, which includes the figuredefinition statements 11a, 11b, 11c, . . . of defined points, straightlines and circles, etc., to be displayed in the area at the upper partof the display screen 10 for conversationally defining figures (see FIG.1). The processor 1a causes the graphic images 12a, 12b, 12c, . . . ofthe figure elements to be displayed in a form superimposed on list 11(step 100). The figure definition statement of a point is displayed inthe form

    P □□X.sub.i Y.sub.i                  (1)

by the point identifier (the alphabetic character P and a two-digitidentification number) and the coordinates X_(i), Y_(i) of the point.The figure definition statement of a straight line is displayed in theform

    S □□L.sub.i A.sub.i                  (2)

by the straight-line identifier (the alphabetic character S and atwo-digit identification number), distance L_(i) from the origin and anangle A_(i) defined by the straight line and the horizontal axis. Thefigure definition statement of a circle is displayed in the form

    C □□X.sub.i Y.sub.i R.sub.i          (3)

by the circle identifier (the alphabetic character C and a two-digitidentification number), the coordinates X_(i), Y_(i) of the center ofthe circle, and the radius R_(i) of the circular arc.

When a new figure element is to be defined using already defined figureelements under these conditions, first the classification (point,straight line or circle) of the figure element to be defined is enteredin the form of a numerical value 1, 2 or 3 in accordance with a promptfor the figure element (EM) which appears in a prompt area (see FIG. 1)at the lower part of the display screen, and the identification number(ID) of this figure element is entered (step 101).

Thereafter, the first element selection key 13a is pressed to select thefirst figure element (step 102).

Each time the first figure element selection key 13a is pressed, theprocessor 1a causes the figure definition statements (11a, 11b, 11c,etc.) in the list 11 to be displayed, one after another starting fromthe first statement, in a form distinguishable from the other figuredefinition statements (as by making the statement blink), and causes thecorresponding graphic images (12a, 12b, 12c, etc.) to be displayed, oneafter another starting from the first image, in a form distinguishablefrom the other graphic images, as by altering the color or thebrightness of the image (step 103). It should be noted that theidentification number of the figure element selected and presently madeto blink by the first element selection key 13a in the area 14a on theleft side of the "FIGURE SELECTION AREA" 14 on display screen 10 in FIG.1 is displayed so as to follow the alphabetic character P, S or C.

The foregoing operation and display processing are carried out until thefirst figure element is selected. When the desired figure element isdisplayed in a distinguishable form and selected (steps 102-104), thesecond element selection key 13b is operated next in order to select thesecond figure element (step 105).

Whenever the second element selection key 13b is pressed, the processorla similarly causes the figure definition statements (11a, 11b, 11c,etc.) in the list 11 to be displayed, one after another starting fromthe first statement, in blinking form, and causes the correspondinggraphic images to be displayed, one after another starting from thefirst image, in a different color or brightness, by way of example (step106). It should be noted that the identification number of the figureelement selected and presently made to blink by the second elementselection key 13b in the area 14b on the right side of the "FIGURESELECTION AREA" 14 on display screen 10 in FIG. 1 is displayed so as tofollow the alphabetic character P, S or C.

The foregoing operation and display processing are carried out until thesecond figure element is displayed (selected) in distinguishable form(steps 105-107). The execute key (input key) 13c, by way of example, isoperated after the second figure element is selected.

Thus, if the new figure element defined by the first and second figureelements is a point, the processor 1a computes the coordinates(X_(i),Y_(i)) of the point using the first and second figure elements,causes the point definition statement having the format shown at (1) tobe displayed supplementarily at the end of list 11 and causes thegraphic image of the point to be displayed. If the new figure elementdefined by the first and second figure elements is a straight line, theprocessor uses the first and second figure elements to compute thedistance L_(i) from the origin to the straight line and the angle A_(i)defined by the straight line and the horizontal axis, causes thestraight-line definition statement having the format shown at (2) to bedisplayed supplementarily at the end of list 11 and causes the graphicimage of the straight line to be displayed. If the new figure elementdefined by the first and second figure elements is a circle, theprocessor 1a uses the first and second figure elements to compute thecoordinates (X_(i),Y.sub. i) of the center of the circle and the radiusR_(i) thereof, causes the circle definition statement having the formatshown at (3) to be displayed supplementarily at the end of list 11 andcauses the graphic image of the circle to be displayed (step 108).

Processing for defining another figure element using already definedfigure elements is thus terminated.

In a case where two or more points, two or more straight lines or two ormore circles are specified by first and second figure elements, theprocessor 1a changes over the conversational screen when the execute key13c is pressed, causes the first and second figure elements and the twoor more points, two or more straight lines or two or more circlesspecified by the first and second figure elements to be displayed, andinquires as to which one is to be defined as a new figure element. Thus,if a figure element to be newly defined is designated by right (R), left(L), above (A) or below (B), for example, then the display screen willreturn to that shown in FIG. 1, the processing of step 108 willthenceforth be executed and definition of the figure element will end.

Thus, in accordance with the present invention, it is arranged todisplay a list and graphic images regarding already defined figureelements on a display screen, successively display, one at a time in aform distinguishable from others, figure definition statements in thelist, as well as the corresponding graphic images, whenever a firstelement selection key is operated, thereby to select a first figureelement, similarly select a second figure element by operating a secondelement selection key, and define another figure element using the firstand second figure elements. Accordingly, it is unnecessary to memorizethe codes of figure elements that have already been defined, and alreadydefined figure elements used in defining a new figure element can beverified visually through a simple method. This makes correct figuredefinition possible.

What is claimed is:
 1. A figure definition method in automaticprogramming for creating an NC part program based on an automaticprogramming language, by using at least two previously defined figureelements to define a new figure element and specifying a tool path usingidentification codes assigned to the defined figure elements, saidmethod comprising the steps of:(a) displaying a list of figuredefinition statements and graphic images regarding the previouslydefined figure elements on a display screen; (b) successively displayingon the display screen, one at a time in a form distinguishable fromothers, the figure definition statements in the list and the graphicimages corresponding thereto, whenever a first element selection key isoperated to select a first figure element of the previously definedfigure elements; (c) successively displaying, one at a time in a formdistinguishable from others, the list of figure definition statementsand the graphic images corresponding thereto, to select a second figureelement by operating a second element selection key after the firstfigure element is selected in step (b); and (d) defining the new figureelement automatically based on the first and second figure elements. 2.A figure definition method in automatic programming according to claim1, wherein said method further comprises the steps of:(e) enteringclassification type and an identification code indicating whether thenew figure element defined by the first and second figure elements is apoint straight line or circle; (f) generating the new figure element ofthe classification type entered in step (e) using the first and secondfigure elements; and (g) assigning the identification code to the figureelement generated in step (f).
 3. A figure definition method inautomatic programming according to claim 2, wherein when a plurality ofnew figure elements are obtained by the first and second figure elementsin step (d), said method further comprises the steps of:(h) displayingthe first and second figure elements and the plurality of new figureelements on the display screen; and (i) selecting one of the pluralityof new figure elements as a desired figure element.
 4. A figuredefinition method in automatic programming according to claim 3, whereinsaid selecting in step (i) of the desired figure element is performed bydesignating "right" when the desired figure element among the pluralityof figure elements is a figure element on a right side, designating"left" when the desired figure element is a figure element on a leftside, designating "above" when the desired figure element is a figureelement on an upper side, and designating "below" when the desiredfigure element is a figure element on a lower side.
 5. A method forproducing a figure element definition statement of a figure element usedto create a numerical control program based on an automatic programminglanguage, said method comprising the steps of:(a) displaying a pluralityof previously defined figure element definition statements along withgraphic images corresponding to a plurality of previously defined figureelements; (b) receiving a classification type and an identification codefor a new figure element to be defined; (c) selecting a first figureelement of the previously defined figure elements by sequentiallydisplaying the defined figure element definition statement and thegraphic image of each of the previously defined figure elements in amanner distinguishable from other previously defined figure elements toindicate its selection; (d) selecting a second figure element of thepreviously defined figure elements by sequentially displaying thedefined figure element definition statement and the graphic image ofeach of the previously defined figure elements in a mannerdistinguishable from other previously defined figure elements toindicate its selection; and (e) producing the new figure element inaccordance with the classification type, the second figure element andthe second figure element.
 6. A method as recited in claim 5,whereinstep (e) includes the substep of (e1) producing a figure elementdefinition statement and a graphic image for the new figure element, andwherein said method further comprises the step of (f) displaying thefigure element definition statement along with the graphic imagecorresponding to the new figure element.
 7. A method as recited in claim5, wherein said method is performed by an automatic programmingapparatus having a display screen, a first selection key and a secondselection key,wherein said displaying in step (a) and thedistinguishably displaying in steps (c) and (d) occurs on the displayscreen, and wherein said selecting in step (c) is performed by the firstselection key, and the selecting in step (d) by the second selectionkey.
 8. A method as recited in claim 5,wherein step (c) includes thesubstep (c1) displaying the identification code of the first figureelement after the first figure element is selected, and wherein step (d)includes the substep (d1) displaying the identification code of thesecond figure element after the second figure element is selected.
 9. Amethod as recites in claim 5, wherein said method further comprises thestep (f) repeating steps (a) through (e) with the new figure element asone of the plurality of previously defined figure elements.
 10. Anautomatic control system for producing a figure element definitionstatement of a figure element used to create a numerical control programbased on an automatic programming language, comprising:display means fordisplaying a plurality of previously defined figure element definitionstatements along with graphic images corresponding to a plurality ofpreviously defined figure elements; input means for inputting aclassification type and an identification code for a new figure elementto be defined, a first selection signal, and a second selection signal;and control means for controlling selection of a first figure elementand a second figure element, and for producing the new figure, saidcontrol means including first selection means for selecting the firstfigure element from the previously defined figure elements by sequencingthrough the previously defined figure elements in accordance with thefirst selection signal; second selection means for selecting the secondfigure element from the previously defined figure elements by sequencingthrough the previously defined figure elements in accordance with thesecond selection signal; and computation means for producing the newfigure element in accordance with the classification type, the secondfigure element and the second figure element.
 11. A system as recited inclaim 10,wherein said first selection means sequentially displays thedefined figure element statement and the graphic image of each of thepreviously defined figure elements in a manner distinguishable fromother previously defined figure elements to indicate its selection, andwherein said second selection means sequentially displays the definedfigure element statement and the graphic image of each of the previouslydefined figure elements in a manner distinguishable from otherpreviously defined figure elements to indicate its selection.